*{
    margin: 0;
    padding: 0;
    list-style: none;
}
/* Class Carousel */
.Carousel {
    position: relative;     /* 內部絕對定位的按鈕與文字 */
    max-width: 100%;
    /* height: 500px; */
    height: 85vh;
    background-color: #f0f0f0; 
    border: 1px solid #ccc; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;               /* 隱藏圖片或文字可能超出的部分 */
}
.Slideshow {
    display: none;
    height: 100%;
}
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}
@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}
.Slideshow img {
    width: 100%;
    height: 100%;
    /* height: auto; */         /* auto 會有圖片脫離幻燈片的問題 */
    /* object-fit: scale-down;  */  /* 圖片全圖顯示不填滿 */
    object-fit: cover;              /* 圖片部分裁切填滿顯示 */
    object-position: top center; /* 確保裁切時以圖片中心為主 */
    /* object-position: center center; */ /* 若希望圖片上下左右都以中心裁切 */
    display: block;                 /* 避免圖片下方產生不明空隙 */
}
.Slideshow .numbertext {
    position: absolute;
    bottom: 20%;                                /* 調整文字位置 */
    left: 10%;
    color: white;                             /* 文字顏色 */
    background-color: rgba(0, 0, 0, 0.3);     /* 背景色 */
    padding: 10px;
    border-radius: 5px;
    font-size: 4.5rem;
    font-weight: bold;
}
.Slideshow .imagetext {
    position: absolute;
    bottom: 10%;
    left: 10%;
    text-align: center;
    color: white; /* 文字顏色 */
    background-color: rgba(0, 0, 0, 0.3); /* 背景色 */
    padding: 10px;
    border-radius: 5px;
    font-size: 1.5rem;
    font-weight: bolder;
}

/* Next and previous buttons */
.prev, .next {
    background-color: rgba(0, 0, 0, 0);
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none; /* Prevents the user from selecting the text on the button. */
}
.prev {
    left: 3em;
    border-radius: 3px 0 0 3px;
}
.next {
    right: 3em;
}
.prev:hover, .next:hover {
    background-color: rgba(224, 211, 211, 0.3);
    transition-duration: 1.5s;
}

/* The dots/circles */
.dotsCircles {
    position: absolute;             /* 啟用絕對定位，確保點指示器維持在圖片上方 */
    bottom: 15px;                   /* 距離幻燈片底部高度(可調整) */
    left: 0;                        /* 從最左側開始 */
    width: 100%;                    /* 確保指示器的寬度佔滿容器 */
    z-index: 10;                    /* 確保指示器維持在圖片上方 */
    height: auto;                   /* 調整高度由內容決定(可調整固定值) */
    padding: 5px 0;                 /* 增加指示器內部上下邊距 */

    display: flex;                  /* 控制內部 dot 置中 */
    justify-content: center;        /* 控制內部 dot 水平置中 */
    align-items: center;            /* 控制內部 dot 垂直置中 */

    background-color: rgba(0, 0, 0, 0); /* 可調整背景色彩 */
}
.dot {
    height: 12px;
    width: 12px;
    margin: 0 10px;                  /* 點之間的距離 */
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    /* transition: background-color 0.3s ease; */

}
.active, .dot:hover {
    background-color: #F8BE67;
}



@media (max-width: 970px) {
    .Carousel {
        height: auto;
    }
    .Slideshow .numbertext {
        font-size: 3.5rem;
    }
    .Slideshow .imagetext {
        font-size: 1.3rem;
    }
}

@media (max-width: 800px) {
    .Carousel {
        height: auto;
    }
    .Slideshow .numbertext {
        font-size: 3rem;
        bottom: 18%;
    }
    .Slideshow .imagetext {
        font-size: 1rem;
        bottom: 6%;
    }
    .prev {
        left: 1em;
    }
    .next {
        right: 1em;
    }
    .dot {
        height: 10px;
        width: 10px;
    }
}

@media (max-width: 600px) {
    .Slideshow .numbertext {
        font-size: 2.5rem;
        bottom: 20%;
    }
    .Slideshow .imagetext {
        font-size: 1rem;
        bottom: 8%;
    }    
}


@media (max-width: 550px) {
    body {
        width: 100%;
    }
    .Slideshow .numbertext {
        font-size: 2rem;
        bottom: 20%;
    }
    .Slideshow .imagetext {
        font-size: 0.8rem;
        bottom: 5%;
    }
    .prev {
        left: 0.5em;
    }

    .next {
        right: 0.5em;
    }
    .dot {
        height: 8px;
        width: 8px;
    }
}
